package com.zzf.concurrent.example.design.pattern.two.phase.termination;

import com.zzf.concurrent.example.util.TimeUtil;

/**
 * @author GaoFeng2017
 * @date 2019/9/9 20:47
 */
public class App {
    public static void main(String[] args) {
        chatExample();
    }

    private static void simpleExample() {
        CounterThread counterThread = new CounterThread();
        counterThread.start();
        TimeUtil.sleep(3000);
        counterThread.shutdown();
    }

    private static void chatExample() {
        ChatServer chatServer = new ChatServer();
        chatServer.start();

        TimeUtil.sleep(10000);
        chatServer.shutdown();
    }
}
